import http from '@/common/api/http'

export function getEquipmentsList(params) {
    // debugger
    // return http.get('/device2/getDeviceList2', {
    return http.get('/getDeviceListAll', {
        params
    })
}

//获取公司设备列表
export function getConpanyDeviceList(params) {
    return http.get('/getDeviceList', {
        params
    })
}

//获取公司信息
export function getConpanyInfo(params) {
    return http.get('/getConpanyInfo', {
        params
    })
}

//获取一台设备信息
export function getOneDeviceInfo(params) {
    return http.get('/getOneDeviceInfo', {
        params
    })
}

//获取设备综合数据
export function getDeviceSyntheticData(params) {
    return http.get('/getDeviceSyntheticData', {
        params
    })
}

export function getEquipmentBaseInfo(params) {
    return http.get('/device/getDeviceBasicInfo', {
        params
    })
}

export function getEquipmentInfo(params) {
    return http.get('/device/basic', {
        params
    })
}

export function fieldType(params) {
    return http.get('/fieldType', {
        params
    })
}

export function getEquipmentOptions(params) {
    return http.get('/equipment/getequipmentoptions', {
        params
    })
}

export function editMaintrinUser(data) {
    return http.post("/repairLog/modifyRepairUser", data)
}

export function editAttachFile(data) {
    return http.post("/repairLog/modifyRepairImg", data)
}

export function getWorkList(params) {
    // return http.get("/work/list", {
    return http.get("/getDeviceOrderNumberDetail", {
        params
    })
}

export function getChartData(params) {
    return http.get("/healthCheck/getCheckList", {
        ...params,
        params
    })
}

export function getDeviceWarningValue(params) {
    return http.get("/getDeviceWarningValue", {
        params
    })
}

export function toPDF(params) {
    return http.get("/toPdf", {
        params
    });
}

export function getDeviceMonitoringData(params = {}) {
    return http.get("/getDeviceMonitoringData", {
        params
    })
}
export function getDeviceRadarData(params = {}) {
    return http.get("/getDeviceRadarData", {
        params
    })
}
export function getDeviceBrokenLineData(params) {
    return http.get("/getDeviceBrokenLineData", {
        params
    })
}
export function getDeviceThresholdDetail(params = {}) {
    return http.get("/getDeviceThresholdDetail", {
        params
    })
}
export function getDeviceThresholdList(params = {}) {
    return http.get("/getDeviceThresholdList", {
        params
    })
}
export function addDeviceThreshold(data = {}) {
    return http.post("/addDeviceThreshold", data)
}

// 获取公司信息
export function getCompanyinfo(data) {
    return http.get('/companyinfo', data)
}

// 获取工厂列表
export function getFactoryList(data) {
    return http.get('/factory/lists', data)
}
// 获取产线列表
export function getProlineList(data) {
    return http.get('/productionLine/lists', data)
}
// 获取主机列表
export function getDeviceList(data) {
    return http.get('/device/host/lists', data)
}
// 获取齿轮箱油站列表
export function getGearboxList(data) {
    return http.get('/gear/box/lists', data)
}
export function FollowAdd(data) { // 关注、取消设备
    return http.post("/device/follow/add", data)
}

export function getConpanyDevice(data) { // 关注、取消设备
    return http.post("/device/getDevice", data)
}